﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CNUtility
{
    /// <summary>
    /// Holds information about the origin of an action that is being performed on
    /// the model. This allows observers of events from the model to know who performed
    /// the action. This can be useful to avoid infinite loops, for example:
    /// - User adds a shape
    /// - Network replicates it to other clients
    /// - Remote clients add the shape to their model
    /// - The remote models trigger events.
    /// - The remote clients replicate the action back across the network\- etc.
    /// </summary>
    public class ActionOrigin
    {
        public enum OriginTypeEnum
        {
            DB_LOAD,
            USER_ACTION
        }

        public OriginTypeEnum OriginType { get; set; }
        public Guid ClientID { get; set; }
    }
}
